package cn.wolfcode.luowowo.mgrsite.controller;

import cn.wolfcode.luowowo.article.domain.Region;
import cn.wolfcode.luowowo.article.domain.StrategyTag;
import cn.wolfcode.luowowo.article.service.IDestinationService;
import cn.wolfcode.luowowo.article.service.IRegionService;
import cn.wolfcode.luowowo.article.service.IStrategTagService;
import cn.wolfcode.luowowo.common.query.QueryObject;
import cn.wolfcode.luowowo.common.util.JSONResult;
import cn.wolfcode.luowowo.search.query.SearchQueryObject;
import cn.wolfcode.luowowo.search.service.IStrategySearchService;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("strategyTag")
public class StratevTagController {
    @Reference
    private IStrategTagService stratevTagService;
    @Reference
    private IStrategySearchService strategySearchService;


    @RequestMapping("list")
   public String list(@ModelAttribute("qo")QueryObject qo,Model model){
        PageInfo<StrategyTag> pageInfo = stratevTagService.queryForList(qo);
        model.addAttribute("pageInfo",pageInfo);
        return "strategyTag/list";
    }
    @RequestMapping("secarchPage")
   public String secarchPage(@ModelAttribute("qo")SearchQueryObject qo, Model model){

        model.addAttribute("page",strategySearchService.queryForList(qo));
        return "strategy/strategyTag";
    }
}
